package com.sodaopen.study.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.sodaopen.study.entity.Media;

public interface MediaMapper {

	@Select("select * from t_media where id=#{mediaId}")
	Media selectById(Integer mediaId);

	@Select("select * from t_media order by id desc")
	List<Media> selectByParam();

	@Insert("insert into t_media(name, type, url) values(#{name}, #{type}, #{url})")
	void insertMedia(Media media);

}
